package com.initial.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.initial.entity.TbSystemRoleFunction;
import com.initial.entity.TbSystemUserRole;
import com.initial.entity.VMenu;
import com.initial.service.TbSystemRoleFunctionService;
import com.initial.mapper.TbSystemRoleFunctionMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 29081
* @description 针对表【tb_system_role_function】的数据库操作Service实现
* @createDate 2021-12-21 15:36:04
*/
@Service
public class TbSystemRoleFunctionServiceImpl extends ServiceImpl<TbSystemRoleFunctionMapper, TbSystemRoleFunction>
    implements TbSystemRoleFunctionService{
    @Resource
    private TbSystemRoleFunctionMapper tbSystemRoleFunctionMapper;

    @Override
    public List<VMenu> selectListId(Integer roleid) {
        List<VMenu> tbSystemRoleFunctions = tbSystemRoleFunctionMapper.selectListId(roleid);
        return tbSystemRoleFunctions;
    }

    @Override
    public boolean selectByIdRole(Integer roleid, Integer funcid) {
        boolean b=false;
        TbSystemRoleFunction tbSystemRoleFunction = tbSystemRoleFunctionMapper.selectByIdRole(roleid, funcid);
        if (tbSystemRoleFunction == null){
            b=true;
        }
        return b;
    }
}




